<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 
   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Game</title>
</head>
<body>
Player Information : 
<br>
<c:set var="player" value="${sessionScope.playerDetails}"/>
<table id="playerInformation" border="3">
<tr>
	<th bgcolor=>ID</th>
	<th bgcolor=>Email</th>
    <th bgcolor=>FirstName</th>
    <th bgcolor=>LastName</th>
</tr>
<tr>
    <td>${player.playerID}&nbsp;&nbsp;</td> 
    <td>${player.email}&nbsp;&nbsp;</td> 
    <td>${player.firstName}&nbsp;&nbsp;</td> 
    <td>${player.lastName}&nbsp;&nbsp;</td> 
</tr>
</table>
<br><br><br><br>
Game Information:
<br>
<c:set var="game" value="${requestScope.currentGame}"/>
<table id="gamenformation" border="3">
<tr>
	<th bgcolor=>Game ID</th>
	<th bgcolor=>Game Name</th>
    <th bgcolor=>Creator ID</th>
	<th bgcolor=>Start Date</th>
	<th bgcolor=>Initial Balance</th>
	
</tr>
<tr>
    
    <td>${game.gameID}&nbsp;&nbsp;</td> 
    <td>${game.gameName}&nbsp;&nbsp;</td> 
    <td>${game.creator}&nbsp;&nbsp;</td> 
    <td>${game.startDate}&nbsp;&nbsp;</td> 
    <td>${game.initialBalance}&nbsp;&nbsp;</td> 
</tr>
</table>

<br><br><br><br>
All the players in this game
<br><br>
<table id="playerInGameTable" border="3">
<tr >
    <th bgcolor=>Player ID</th>
    <th bgcolor=>First Name</th>
    <th bgcolor=>Last Price</th>
</tr>
<c:forEach var="player" begin="0" items="${requestScope.playerListInGame}">
<tr>
    <td>${player.playerID}&nbsp;&nbsp;</td> 
    <td>${player.firstName}&nbsp;&nbsp;</td> 
    <td>${player.lastName}&nbsp;&nbsp;</td> 
</tr> 
</c:forEach>

</table>

<br><br><br><br>
All available stock in this game
<br><br>
<table id="stockListTable" border="3">
<tr >
    <th bgcolor=>Stock ID</th>
    <th bgcolor=>Stock Name</th>
    <th bgcolor=>Current Price</th>
</tr>
<c:forEach var="stock" begin="0" items="${requestScope.stockList}">
<tr>
    <td>${stock.stockID}&nbsp;&nbsp;</td> 
    <td>${stock.stockName}&nbsp;&nbsp;</td> 
    <td>${stock.currentPrice}&nbsp;&nbsp;</td> 
</tr> 
</c:forEach>

</table>

</body>
</html>